package com.jinloes.webfit;


import com.jinloes.webfit.persistence.User;

public class HSQLUserTest {

    public static void main(String[] args) {
        UserDao userDao = new UserDaoHibernate();
        //userDao.setSessionFactory();
        User user = new User();
        user.setUsername("test");
        user.setPassword("1234");
        user.setRole(User.Role.USER);
        System.out.println(User.Role.USER.toString());
        userDao.saveUser(user);
        System.out.println(userDao.getUserByName("test").getUsername());
    }

}
